package com.sihan.framework.etm.dto;

import com.framework.util.lang.Regex;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import lombok.Data;

@Data
public class UserUpdateDTO implements Serializable {

  private static final long serialVersionUID = -2387455930074593640L;

  @NotNull(message = "{id}")
  @ApiModelProperty(value = "用户Id")
  private String id;

  @Pattern(regexp = Regex.NAME, message = "{user.name}")
  @NotNull
  @ApiModelProperty(value = "用户昵称")
  private String name;
  
  @ApiModelProperty(value = "电话")
  private String phone;

  @ApiModelProperty(value = "性别: true --> 男  false -->女")
  private Boolean sex;
  
  @ApiModelProperty(value = "单位Id")
  private String orgId;

  @ApiModelProperty(value = "角色Ids")
  private List<String> roleIds;
  
  @ApiModelProperty(value = "面部图片名称")
  private String faceImgs;
  @ApiModelProperty(value = "iccard信息")
  private String icCard;

  @Override
  public String toString() {
    return "用户id[" + id +
            "]、昵称[" + name +
            "]、性别[" + (sex ? "男" : "女") +
            "]、角色[" + roleIds +
            "]。";
  }
}
